<?php
/**
 * 入库单
 * @package  htdocs
 * @subpackage  quanliadmin
 * @author   create by allen.qiang
 */

class pa_warehouseManage {

    public function execute() {

        if (isset($_REQUEST['operFlg']) && $_REQUEST['operFlg'] > 0) {

            switch ($_REQUEST['operFlg']) {

                case 1:
                    $this->putInStoreList();                                                                //入库单列表
                    break;

                default:
                    $this->toError('参数错误');
                    break;

            }

        } else {
            $this->toError('参数错误');
        }

    }

    /**
     * 转跳到错误页面
     * @param string $msg 错误信息
     */
    private function toError( $msg = '' ) {

        global $G_PGLOB;

        $G_PGLOB->display_error_page( $msg );

    }

    /**
     * 入库单列表页
     */
    private function putInStoreList() {

        global $G_PGLOB;
        //当前时间
        $currentDate = date('Y-m-d');
        $city = get_city();
        $G_PGLOB->smarty->assign('currentDate',$currentDate);
        $G_PGLOB->smarty->assign('city',$city);                                                             //查询城市
        $G_PGLOB->smarty->assign('voucher_operator',$G_PGLOB->currentUserID);                           //质检人
        $G_PGLOB->smarty->assign( 'EDIT_PERMISSION' , $G_PGLOB->has_permission(20501) );

        $G_PGLOB->smarty->display('wms/voucherGoodsList.tpl');

    }
}